package com.changgou.comment;

import entity.IdWorker;
import entity.TokenDecode;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author : Haha
 * @date : Created in 2019/8/18  10:51
 * @description:
 */
@SpringBootApplication
@EnableDiscoveryClient //开启eureka发现功能
@EnableFeignClients(basePackages = "com.changgou.goods.feign")
@MapperScan(basePackages = "com.changgou.comment.dao")
public class CommentApplication {
    public static void main(String[] args) {
        SpringApplication.run(CommentApplication.class,args);
    }
    @Bean
    public IdWorker idWorker(){
        return new IdWorker();
    }
    @Bean
    public TokenDecode tokenDecode(){
        return new TokenDecode();
    }
}
